package com.microback.base.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.microback.base.mapper.db1.SysAccountMapper;
import com.microback.base.model.SysAccount;
import com.microback.base.service.IAccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AccountService implements IAccountService {

    @Resource
    private SysAccountMapper sysAccountMapper;

    @Override
    public IPage queryAccountList(Integer currentPage, Integer pageSize) {
        Page<SysAccount> page = new Page<SysAccount>(currentPage,pageSize);

        List<SysAccount> list = sysAccountMapper.selectAccountList(page);
        page.setRecords(list);

        return page;
    }
}
